<form id="public-library-upload-form" class="upload-modal" enctype="multipart/form-data" action="" method="post" style="display:none;">
	<fieldset>
		<h3>Upload a File <small>Add a new file to the Library.</small></h3>
		<label>Choose a file:</label>
		<div class="file-input"><input type="file" name="Filedata" /></div>
		
		<label>Give the file a name:</label>
		<input class="input-text" id="file_name" name="file_name" type="text" />

		<label>Who can see this file:</label>
		<select id="permit" name="permit" size="1">
   			 <option value="0" selected="selected">Private</option>
   			 <option value="4">Everyone</option>
   		 	<option value="2">Network</option>
		</select>
		
		<label>Choose a category:</label>
		
		<select id="category" name="category" size="1">
			<?php foreach(LibraryPeer::getCategories() as $plural=>$singular):?>
				<option value="<?echo $singular?>" ><?php echo ucwords($plural)?></option>
			<?php endforeach?>
		</select>
		
		<!-- 
		<label>Tag this file:</label>
		<div class="tag-input">
			<input type="text" />
			<ul class="added-tags">
				<li><span>tag one</span><a href="#"></a></li>

				<li><span>another tag</span><a href="#"></a></li>
			</ul>
		</div>
		<ul class="tags">
			<li><strong>Common tags:</strong></li>
			<li><a href="#">one</a>, </li>
			<li><a href="#">two</a>, </li>

			<li><a href="#">twentytwo</a>, </li>
			<li><a href="#">hamlet</a>, </li>
			<li><a href="#">another</a>, </li>
			<li><a href="#">yet another</a>, </li>
			<li><a href="#">even more</a>, </li>

			<li><a href="#">more still</a>, </li>
			<li><a href="#">last one</a></li>
		</ul>
		 -->
		 
		<div class="actions">
			<input type="hidden" name="fmt" value="redir"/>
			<input id="loc" type="hidden" name="loc" value="<? 
				$url = url_for('files/add', true) . "?access=every"; 
				echo $url; ?>"/>
			<input id="errloc"  type="hidden" name="errloc" value="<? 
				$url = url_for('files/add', true) . "?access=every"; 
				echo $url; ?>"/>
			
			<input type="button" id="upload-submit" value="Upload this File" />
			or <a href="#" id="upload-cancel">cancel</a>

		</div>
	</fieldset>
</form>